3.1.35 \(\int \frac {\cos ^6(x)}{a+b \cos ^2(x)} \, dx\) [35]

Optimal. Leaf size=87 \[ \frac {\left (8 a^2-4 a b+3 b^2\right ) x}{8 b^3}+\frac {a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{b^3 \sqrt {a+b}}-\frac {(4 a-3 b) \cos (x) \sin (x)}{8 b^2}+\frac {\cos ^3(x) \sin (x)}{4 b} \]

[Out]

1/8*(8*a^2-4*a*b+3*b^2)*x/b^3-1/8*(4*a-3*b)*cos(x)*sin(x)/b^2+1/4*cos(x)^3*sin(x)/b+a^(5/2)*arctan(cot(x)*(a+b
)^(1/2)/a^(1/2))/b^3/(a+b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3266, 481, 592, 536, 209, 211} \begin {gather*} \frac {a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{b^3 \sqrt {a+b}}+\frac {x \left (8 a^2-4 a b+3 b^2\right )}{8 b^3}-\frac {(4 a-3 b) \sin (x) \cos (x)}{8 b^2}+\frac {\sin (x) \cos ^3(x)}{4 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]^6/(a + b*Cos[x]^2),x]

[Out]

((8*a^2 - 4*a*b + 3*b^2)*x)/(8*b^3) + (a^(5/2)*ArcTan[(Sqrt[a + b]*Cot[x])/Sqrt[a]])/(b^3*Sqrt[a + b]) - ((4*a
 - 3*b)*Cos[x]*Sin[x])/(8*b^2) + (Cos[x]^3*Sin[x])/(4*b)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 481

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-a)*e^(
2*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*n*(b*c - a*d)*(p + 1))), x] + Dist[e^
(2*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1)
+ (a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0]
 && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 592

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[g^(n - 1)*(b*e - a*f)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*n*(b*c -
a*d)*(p + 1))), x] - Dist[g^n/(b*n*(b*c - a*d)*(p + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*S
imp[c*(b*e - a*f)*(m - n + 1) + (d*(b*e - a*f)*(m + n*q + 1) - b*n*(c*f - d*e)*(p + 1))*x^n, x], x], x] /; Fre
eQ[{a, b, c, d, e, f, g, q}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, 0]

Rule 3266

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[x^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p +
 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cos ^6(x)}{a+b \cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^3 \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )\\ &=\frac {\cos ^3(x) \sin (x)}{4 b}-\frac {\text {Subst}\left (\int \frac {x^2 \left (3 a+(-a+3 b) x^2\right )}{\left (1+x^2\right )^2 \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )}{4 b}\\ &=-\frac {(4 a-3 b) \cos (x) \sin (x)}{8 b^2}+\frac {\cos ^3(x) \sin (x)}{4 b}+\frac {\text {Subst}\left (\int \frac {a (4 a-3 b)+\left (-4 a^2+a b-3 b^2\right ) x^2}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )} \, dx,x,\cot (x)\right )}{8 b^2}\\ &=-\frac {(4 a-3 b) \cos (x) \sin (x)}{8 b^2}+\frac {\cos ^3(x) \sin (x)}{4 b}+\frac {a^3 \text {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\cot (x)\right )}{b^3}-\frac {\left (8 a^2-4 a b+3 b^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (x)\right )}{8 b^3}\\ &=\frac {\left (8 a^2-4 a b+3 b^2\right ) x}{8 b^3}+\frac {a^{5/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{b^3 \sqrt {a+b}}-\frac {(4 a-3 b) \cos (x) \sin (x)}{8 b^2}+\frac {\cos ^3(x) \sin (x)}{4 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 76, normalized size = 0.87 \begin {gather*} \frac {4 \left (8 a^2-4 a b+3 b^2\right ) x-\frac {32 a^{5/2} \text {ArcTan}\left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{\sqrt {a+b}}-8 (a-b) b \sin (2 x)+b^2 \sin (4 x)}{32 b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^6/(a + b*Cos[x]^2),x]

[Out]

(4*(8*a^2 - 4*a*b + 3*b^2)*x - (32*a^(5/2)*ArcTan[(Sqrt[a]*Tan[x])/Sqrt[a + b]])/Sqrt[a + b] - 8*(a - b)*b*Sin
[2*x] + b^2*Sin[4*x])/(32*b^3)

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 92, normalized size = 1.06

method result size
default \(\frac {\frac {\left (-\frac {1}{2} a b +\frac {3}{8} b^{2}\right ) \left (\tan ^{3}\left (x \right )\right )+\left (-\frac {1}{2} a b +\frac {5}{8} b^{2}\right ) \tan \left (x \right )}{\left (1+\tan ^{2}\left (x \right )\right )^{2}}+\frac {\left (8 a^{2}-4 a b +3 b^{2}\right ) \arctan \left (\tan \left (x \right )\right )}{8}}{b^{3}}-\frac {a^{3} \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{b^{3} \sqrt {\left (a +b \right ) a}}\) \(92\)
risch \(\frac {x \,a^{2}}{b^{3}}-\frac {a x}{2 b^{2}}+\frac {3 x}{8 b}+\frac {i {\mathrm e}^{2 i x} a}{8 b^{2}}-\frac {i {\mathrm e}^{2 i x}}{8 b}-\frac {i {\mathrm e}^{-2 i x} a}{8 b^{2}}+\frac {i {\mathrm e}^{-2 i x}}{8 b}+\frac {\sqrt {-\left (a +b \right ) a}\, a^{2} \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-\left (a +b \right ) a}+2 a +b}{b}\right )}{2 \left (a +b \right ) b^{3}}-\frac {\sqrt {-\left (a +b \right ) a}\, a^{2} \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-\left (a +b \right ) a}-2 a -b}{b}\right )}{2 \left (a +b \right ) b^{3}}+\frac {\sin \left (4 x \right )}{32 b}\) \(177\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^6/(a+b*cos(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/b^3*(((-1/2*a*b+3/8*b^2)*tan(x)^3+(-1/2*a*b+5/8*b^2)*tan(x))/(tan(x)^2+1)^2+1/8*(8*a^2-4*a*b+3*b^2)*arctan(t
an(x)))-1/b^3*a^3/((a+b)*a)^(1/2)*arctan(a*tan(x)/((a+b)*a)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 97, normalized size = 1.11 \begin {gather*} -\frac {a^{3} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{3}} - \frac {{\left (4 \, a - 3 \, b\right )} \tan \left (x\right )^{3} + {\left (4 \, a - 5 \, b\right )} \tan \left (x\right )}{8 \, {\left (b^{2} \tan \left (x\right )^{4} + 2 \, b^{2} \tan \left (x\right )^{2} + b^{2}\right )}} + \frac {{\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} x}{8 \, b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^6/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

-a^3*arctan(a*tan(x)/sqrt((a + b)*a))/(sqrt((a + b)*a)*b^3) - 1/8*((4*a - 3*b)*tan(x)^3 + (4*a - 5*b)*tan(x))/
(b^2*tan(x)^4 + 2*b^2*tan(x)^2 + b^2) + 1/8*(8*a^2 - 4*a*b + 3*b^2)*x/b^3

________________________________________________________________________________________

Fricas [A]
time = 0.44, size = 273, normalized size = 3.14 \begin {gather*} \left [\frac {2 \, a^{2} \sqrt {-\frac {a}{a + b}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} + 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (x\right )^{3} - {\left (a^{2} + a b\right )} \cos \left (x\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) + {\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} x + {\left (2 \, b^{2} \cos \left (x\right )^{3} - {\left (4 \, a b - 3 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, b^{3}}, \frac {4 \, a^{2} \sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (x\right ) \sin \left (x\right )}\right ) + {\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} x + {\left (2 \, b^{2} \cos \left (x\right )^{3} - {\left (4 \, a b - 3 \, b^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, b^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^6/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[1/8*(2*a^2*sqrt(-a/(a + b))*log(((8*a^2 + 8*a*b + b^2)*cos(x)^4 - 2*(4*a^2 + 3*a*b)*cos(x)^2 + 4*((2*a^2 + 3*
a*b + b^2)*cos(x)^3 - (a^2 + a*b)*cos(x))*sqrt(-a/(a + b))*sin(x) + a^2)/(b^2*cos(x)^4 + 2*a*b*cos(x)^2 + a^2)
) + (8*a^2 - 4*a*b + 3*b^2)*x + (2*b^2*cos(x)^3 - (4*a*b - 3*b^2)*cos(x))*sin(x))/b^3, 1/8*(4*a^2*sqrt(a/(a +
b))*arctan(1/2*((2*a + b)*cos(x)^2 - a)*sqrt(a/(a + b))/(a*cos(x)*sin(x))) + (8*a^2 - 4*a*b + 3*b^2)*x + (2*b^
2*cos(x)^3 - (4*a*b - 3*b^2)*cos(x))*sin(x))/b^3]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**6/(a+b*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 104, normalized size = 1.20 \begin {gather*} -\frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} a^{3}}{\sqrt {a^{2} + a b} b^{3}} + \frac {{\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} x}{8 \, b^{3}} - \frac {4 \, a \tan \left (x\right )^{3} - 3 \, b \tan \left (x\right )^{3} + 4 \, a \tan \left (x\right ) - 5 \, b \tan \left (x\right )}{8 \, {\left (\tan \left (x\right )^{2} + 1\right )}^{2} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^6/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

-(pi*floor(x/pi + 1/2)*sgn(a) + arctan(a*tan(x)/sqrt(a^2 + a*b)))*a^3/(sqrt(a^2 + a*b)*b^3) + 1/8*(8*a^2 - 4*a
*b + 3*b^2)*x/b^3 - 1/8*(4*a*tan(x)^3 - 3*b*tan(x)^3 + 4*a*tan(x) - 5*b*tan(x))/((tan(x)^2 + 1)^2*b^2)

________________________________________________________________________________________

Mupad [B]
time = 2.69, size = 1036, normalized size = 11.91 \begin {gather*} -\frac {\frac {{\mathrm {tan}\left (x\right )}^3\,\left (4\,a-3\,b\right )}{8\,b^2}+\frac {\mathrm {tan}\left (x\right )\,\left (4\,a-5\,b\right )}{8\,b^2}}{{\mathrm {tan}\left (x\right )}^4+2\,{\mathrm {tan}\left (x\right )}^2+1}-\frac {\mathrm {atan}\left (\frac {63\,a^4\,\mathrm {tan}\left (x\right )}{64\,\left (\frac {63\,a^4}{64}-\frac {81\,a^3\,b}{256}+\frac {27\,a^2\,b^2}{256}-\frac {35\,a^5}{32\,b}+\frac {5\,a^6}{4\,b^2}\right )}-\frac {81\,a^3\,\mathrm {tan}\left (x\right )}{256\,\left (\frac {27\,a^2\,b}{256}-\frac {81\,a^3}{256}+\frac {63\,a^4}{64\,b}-\frac {35\,a^5}{32\,b^2}+\frac {5\,a^6}{4\,b^3}\right )}-\frac {35\,a^5\,\mathrm {tan}\left (x\right )}{32\,\left (\frac {63\,a^4\,b}{64}-\frac {35\,a^5}{32}+\frac {27\,a^2\,b^3}{256}-\frac {81\,a^3\,b^2}{256}+\frac {5\,a^6}{4\,b}\right )}+\frac {5\,a^6\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {5\,a^6}{4}-\frac {35\,a^5\,b}{32}+\frac {63\,a^4\,b^2}{64}-\frac {81\,a^3\,b^3}{256}+\frac {27\,a^2\,b^4}{256}\right )}+\frac {27\,a^2\,\mathrm {tan}\left (x\right )}{256\,\left (\frac {27\,a^2}{256}-\frac {81\,a^3}{256\,b}+\frac {63\,a^4}{64\,b^2}-\frac {35\,a^5}{32\,b^3}+\frac {5\,a^6}{4\,b^4}\right )}\right )\,\left (a^2\,8{}\mathrm {i}-a\,b\,4{}\mathrm {i}+b^2\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,b^3}-\frac {\mathrm {atan}\left (\frac {\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {2\,a^4\,b^6-\frac {a^3\,b^7}{2}+\frac {3\,a^2\,b^8}{2}}{2\,b^6}-\frac {\mathrm {tan}\left (x\right )\,\left (512\,a^3\,b^6+256\,a^2\,b^7\right )\,\sqrt {-a^5\,\left (a+b\right )}}{128\,b^4\,\left (b^4+a\,b^3\right )}\right )}{2\,\left (b^4+a\,b^3\right )}-\frac {\mathrm {tan}\left (x\right )\,\left (128\,a^7-64\,a^6\,b+64\,a^5\,b^2-24\,a^4\,b^3+9\,a^3\,b^4\right )}{64\,b^4}\right )\,1{}\mathrm {i}}{b^4+a\,b^3}-\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {2\,a^4\,b^6-\frac {a^3\,b^7}{2}+\frac {3\,a^2\,b^8}{2}}{2\,b^6}+\frac {\mathrm {tan}\left (x\right )\,\left (512\,a^3\,b^6+256\,a^2\,b^7\right )\,\sqrt {-a^5\,\left (a+b\right )}}{128\,b^4\,\left (b^4+a\,b^3\right )}\right )}{2\,\left (b^4+a\,b^3\right )}+\frac {\mathrm {tan}\left (x\right )\,\left (128\,a^7-64\,a^6\,b+64\,a^5\,b^2-24\,a^4\,b^3+9\,a^3\,b^4\right )}{64\,b^4}\right )\,1{}\mathrm {i}}{b^4+a\,b^3}}{\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {2\,a^4\,b^6-\frac {a^3\,b^7}{2}+\frac {3\,a^2\,b^8}{2}}{2\,b^6}-\frac {\mathrm {tan}\left (x\right )\,\left (512\,a^3\,b^6+256\,a^2\,b^7\right )\,\sqrt {-a^5\,\left (a+b\right )}}{128\,b^4\,\left (b^4+a\,b^3\right )}\right )}{2\,\left (b^4+a\,b^3\right )}-\frac {\mathrm {tan}\left (x\right )\,\left (128\,a^7-64\,a^6\,b+64\,a^5\,b^2-24\,a^4\,b^3+9\,a^3\,b^4\right )}{64\,b^4}\right )}{b^4+a\,b^3}-\frac {-a^8+\frac {5\,a^7\,b}{4}-\frac {3\,a^6\,b^2}{4}+\frac {9\,a^5\,b^3}{32}}{b^6}+\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {\sqrt {-a^5\,\left (a+b\right )}\,\left (\frac {2\,a^4\,b^6-\frac {a^3\,b^7}{2}+\frac {3\,a^2\,b^8}{2}}{2\,b^6}+\frac {\mathrm {tan}\left (x\right )\,\left (512\,a^3\,b^6+256\,a^2\,b^7\right )\,\sqrt {-a^5\,\left (a+b\right )}}{128\,b^4\,\left (b^4+a\,b^3\right )}\right )}{2\,\left (b^4+a\,b^3\right )}+\frac {\mathrm {tan}\left (x\right )\,\left (128\,a^7-64\,a^6\,b+64\,a^5\,b^2-24\,a^4\,b^3+9\,a^3\,b^4\right )}{64\,b^4}\right )}{b^4+a\,b^3}}\right )\,\sqrt {-a^5\,\left (a+b\right )}\,1{}\mathrm {i}}{b^4+a\,b^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^6/(a + b*cos(x)^2),x)

[Out]

- ((tan(x)^3*(4*a - 3*b))/(8*b^2) + (tan(x)*(4*a - 5*b))/(8*b^2))/(2*tan(x)^2 + tan(x)^4 + 1) - (atan((63*a^4*
tan(x))/(64*((63*a^4)/64 - (81*a^3*b)/256 + (27*a^2*b^2)/256 - (35*a^5)/(32*b) + (5*a^6)/(4*b^2))) - (81*a^3*t
an(x))/(256*((27*a^2*b)/256 - (81*a^3)/256 + (63*a^4)/(64*b) - (35*a^5)/(32*b^2) + (5*a^6)/(4*b^3))) - (35*a^5
*tan(x))/(32*((63*a^4*b)/64 - (35*a^5)/32 + (27*a^2*b^3)/256 - (81*a^3*b^2)/256 + (5*a^6)/(4*b))) + (5*a^6*tan
(x))/(4*((5*a^6)/4 - (35*a^5*b)/32 + (27*a^2*b^4)/256 - (81*a^3*b^3)/256 + (63*a^4*b^2)/64)) + (27*a^2*tan(x))
/(256*((27*a^2)/256 - (81*a^3)/(256*b) + (63*a^4)/(64*b^2) - (35*a^5)/(32*b^3) + (5*a^6)/(4*b^4))))*(a^2*8i -
a*b*4i + b^2*3i)*1i)/(8*b^3) - (atan((((-a^5*(a + b))^(1/2)*(((-a^5*(a + b))^(1/2)*(((3*a^2*b^8)/2 - (a^3*b^7)
/2 + 2*a^4*b^6)/(2*b^6) - (tan(x)*(256*a^2*b^7 + 512*a^3*b^6)*(-a^5*(a + b))^(1/2))/(128*b^4*(a*b^3 + b^4))))/
(2*(a*b^3 + b^4)) - (tan(x)*(128*a^7 - 64*a^6*b + 9*a^3*b^4 - 24*a^4*b^3 + 64*a^5*b^2))/(64*b^4))*1i)/(a*b^3 +
 b^4) - ((-a^5*(a + b))^(1/2)*(((-a^5*(a + b))^(1/2)*(((3*a^2*b^8)/2 - (a^3*b^7)/2 + 2*a^4*b^6)/(2*b^6) + (tan
(x)*(256*a^2*b^7 + 512*a^3*b^6)*(-a^5*(a + b))^(1/2))/(128*b^4*(a*b^3 + b^4))))/(2*(a*b^3 + b^4)) + (tan(x)*(1
28*a^7 - 64*a^6*b + 9*a^3*b^4 - 24*a^4*b^3 + 64*a^5*b^2))/(64*b^4))*1i)/(a*b^3 + b^4))/(((-a^5*(a + b))^(1/2)*
(((-a^5*(a + b))^(1/2)*(((3*a^2*b^8)/2 - (a^3*b^7)/2 + 2*a^4*b^6)/(2*b^6) - (tan(x)*(256*a^2*b^7 + 512*a^3*b^6
)*(-a^5*(a + b))^(1/2))/(128*b^4*(a*b^3 + b^4))))/(2*(a*b^3 + b^4)) - (tan(x)*(128*a^7 - 64*a^6*b + 9*a^3*b^4
- 24*a^4*b^3 + 64*a^5*b^2))/(64*b^4)))/(a*b^3 + b^4) - ((5*a^7*b)/4 - a^8 + (9*a^5*b^3)/32 - (3*a^6*b^2)/4)/b^
6 + ((-a^5*(a + b))^(1/2)*(((-a^5*(a + b))^(1/2)*(((3*a^2*b^8)/2 - (a^3*b^7)/2 + 2*a^4*b^6)/(2*b^6) + (tan(x)*
(256*a^2*b^7 + 512*a^3*b^6)*(-a^5*(a + b))^(1/2))/(128*b^4*(a*b^3 + b^4))))/(2*(a*b^3 + b^4)) + (tan(x)*(128*a
^7 - 64*a^6*b + 9*a^3*b^4 - 24*a^4*b^3 + 64*a^5*b^2))/(64*b^4)))/(a*b^3 + b^4)))*(-a^5*(a + b))^(1/2)*1i)/(a*b
^3 + b^4)

________________________________________________________________________________________